import { get, post } from '@/assets/js/request'
const baseUrl = ''
/**
 * 车牌列表
 * @returns promise
 * @param {Number} page 第几页
 * @param {Number} limit 每页多少条
 * @param {String} car_plate 车牌
 */
export const getCarNumberList = (params) => {
    return get(`${baseUrl}/car_plate_list_page`, params)
}
/**
 * 车牌更新
 * @returns promise
 * @param {String} id
 * @param {String} car_plate 车牌
 */
export const addUpdateCarNumber = (params) => {
    return post(`${baseUrl}/car_plate_add_update`, params)
}
/**
 * 车牌删除
 * @returns promise
 * @param {String} id
 */
export const deleteCarNubmer = (params) => {
    return post(`${baseUrl}/car_plate_del`, params)
}

/**
 * 海康道闸开闸
 * @returns promise
 * @param {String} ip
 * @param {String} user_name
 * @param {String} password
 */
export const openGate = (params) => {
    return post(`${baseUrl}/cate_control`, params)
}
/**
 * 海康道闸布防
 * @returns promise
 * @param {String} ip
 * @param {String} user_name
 * @param {String} password
 */
export const placeGarrison = (params) => {
    return post(`${baseUrl}/place_troops_on_garrison_duty`, params)
}
/**
 * 海康道闸撤防
 * @returns promise
 * @param {Int} handle  海康设备布防句柄
 * @param {Int} user_id
 */
export const cancelGarrison = (params) => {
    return post(`${baseUrl}/withdraw_garrison`, params)
}
